import { AsyncComponentLoader, Component } from "vue"

export interface MyDefineAsyncComponents<T = unknown>  {
  loader:AsyncComponentLoader<T>
  loadingComponent?: Component
  errorComponent?: Component
  delay?: number
  timeout?: number
  suspensible?: boolean
  onError?:(
    error:Error,
    retry: () => void,
    fail: () => void,
    attempts: number
  )=> unknown
}

  function myDefineAsyncComponents(source:MyDefineAsyncComponents){
    // const {
    //     loader,
    //     loadingComponent,
    //     errorComponent,
    //     delay,
    //     timeout,
    //     suspensible
    console.log(source);
    
    // } = source
}
myDefineAsyncComponents({
    loader: () => import('@/components/particleCom/bigData.vue')
})